Solution of linear partial differential equations by direct integration